package com.flong.desgin.patterns.singleresponsibility;

public class SingleResponsibility2 {

    public static void main(String[] args) {
        RoadVehicle roadVehicle = new RoadVehicle();
        AirVehicle airVehicle = new AirVehicle();
    }
}

class RoadVehicle {

    public void run(String vehicle) {
        System.out.println(vehicle + "在公路上跑");
    }
}

class AirVehicle {

    public void run(String vehicle) {
        System.out.println(vehicle + "在天空上跑");
    }
}

